<extend name="Public/base"/>

<block name="body">
  <div class="main-title">
    <h2>{:isset($data['info']['store_id'])?'编辑':'新增'}店铺</h2>
  </div>
  <form action="{:U('editHandle')}" method="post" class="form-horizontal">
    <div class="form-item">
      <label class="item-label">店主账号</label>
      <div class="controls">
        <input type="text" class="text input-large" disabled value="{$data.info.member_name|default=''}">
      </div>
    </div>
    <div class="form-item">
      <label class="item-label">店铺<span class="check-tips">（必须填写）</span></label>
      <div class="controls">
        <input type="text" class="text input-large" name="store_name" value="{$data.info.store_name|default=''}">
      </div>
    </div>
    <div class="form-item">
      <label class="item-label">佣金<span class="check-tips">（必须填写）</span></label>
      <div class="controls">
        <input type="text" class="text input-large" name="rate" value="{$data.info.rate|default='0'}">%
      </div>
    </div>
    <div class="form-item">
      <label class="item-label">店铺等级</label>
      <div class="controls">
        <select name="grade_id">
          <volist name="data.grade" id="grade">
            <option value="{$grade.id}" <if condition="$grade['id'] eq $data['info']['grade_id']"> selected</if> >{$grade.name}</option>
          </volist>
        </select>
      </div>
    </div>
    <div class="form-item">
      <label class="item-label">有效期至：<span class="check-tips">（格式：2016-06-01，留空表示不限制）</span></label>
      <div class="controls">
        {:W('Editor/dateTime',array(array('time'=>$data['info']['end_time'],'name'=>'end_time')))}
      </div>
    </div>
    <div class="form-item">
      <label class="item-label">状态<span class="check-tips"></span></label>
      <div class="controls">
        <label class="radio"><input <if condition="$data['info']['status'] eq 1">checked="checked"</if> type="radio" name="status" value="1">开启</label>
        <label class="radio"><input <if condition="$data['info']['status'] eq 0">checked="checked"</if> type="radio" name="status" value="0">关闭</label>
      </div>
    </div>
    <div class="form-item">
      <input type="hidden" name="store_id" value="{$data.info.store_id|default=''}">
      <button class="btn submit-btn ajax-post" id="submit" type="submit" target-form="form-horizontal">确 定</button>
      <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
    </div>
  </form>
</block>

<block name="script">
  <script type="text/javascript">
    //导航高亮
    highlight_subnav('{:U("Store/index")}');
  </script>
</block>